﻿namespace lDal
{
    public interface lCaseDal<T>
    {
        /// <summary>
        /// 单个添加
        /// </summary>
        /// <param name="T">定义名称</param>
        /// <returns>返回受影响行数</returns>
        Task<int> AddAsync(T T);

        /// <summary>
        /// 多个添加
        /// </summary>
        /// <param name="list">定义表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> AddRangeAsync(List<T> list);

        /// <summary>
        /// 单个删除
        /// </summary>
        /// <param name="T">定义名称</param>
        /// <returns>返回受影响行数</returns>
        Task<int> RemoveAsync(T T);

        /// <summary>
        /// 多个删除
        /// </summary>
        /// <param name="list">定义表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> RemoveRangeAsync(List<T> list);


        /// <summary>
        /// 单个修改
        /// </summary>
        /// <param name="T">定义名称</param>
        /// <returns>返回受影响行数</returns>
        Task<int> UpdateAsync(T T);

        /// <summary>
        /// 多个修改
        /// </summary>
        /// <param name="list">定义表名</param>
        /// <returns>返回受影响行数</returns>
        Task<int> UpdateRangeAsync(List<T> list);


        /// <summary>
        /// 显示数据
        /// </summary>
        /// <returns>查询显示</returns>
        IQueryable<T> GetList();
    }
}
